package com.hex.liyue.usermodule.presenter;

import com.hex.liyue.commonmodule.manager.HttpManager;
import com.hex.liyue.commonmodule.manager.UserManager;
import com.hex.liyue.commonmodule.net.ResponseListener;
import com.hex.liyue.usermodule.bean.MyMessageResultBean;

/**
 * Created by WJ on 2016/6/26.
 */
public class MePresenter {
    private IMeView iMeView;

    public MePresenter(IMeView iMeView) {
        this.iMeView = iMeView;
    }

    public void getMyMessage() {
        HttpManager.getInstance().getMyMessage(UserManager.getUserId(), new ResponseListener<MyMessageResultBean>() {
            @Override
            public void onSuccess(MyMessageResultBean myMessageResultBean) {
                iMeView.setInfo(myMessageResultBean);
            }

            @Override
            public void onFailure(String responseresult) {
                iMeView.showT(responseresult);
            }
        });
    }
}
